import { getlink } from "@/api/getlink"
export const ygefang = {
    state: {
        cnxh: [],
        wntj: []
    },
    mutations: {
        setcnxh(state, payload) {
            state.cnxh = payload;
        },
        setwntj(state, payload) {
            state.wntj = payload;
        }
    },
    actions: {
        getcnxh(context) {
            getlink('/xpf/cnxh').then((res) => {
                context.commit('setcnxh', res.data)
            })
        },
        getwntj(context) {
            getlink('/xpf/wntj').then((res) => {
                context.commit('setwntj', res.data)
            })
        },
    }
};
